package com.cskaoyan.bean.promotion.coupon;

import com.cskaoyan.util.DateUtils;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @Description:
 * @Author: WD created on 2021-09-17 23:03
 * @Version:
 */
@NoArgsConstructor
@Data
public class CreateCouponVO {

    private Integer id;
    private String name;
    private String desc;
    private String tag;
    private Integer total;
    private Double discount;
    private Double min;
    private Short limit;
    private Short type;
    private Short status;
    private Short goodsType;
    private Integer[] goodsValue;
    private Short timeType;
    private Short days;
    private String addTime;
    private String updateTime;




    public CreateCouponVO(Coupon coupon) {
        this.id = coupon.getId();
        this.name = coupon.getName();
        this.desc = coupon.getDesc();
        this.tag =coupon.getTag();
        this.total = coupon.getTotal();
        this.discount = coupon.getDiscount();
        this.min =coupon.getMin();
        this.limit = coupon.getLimit();
        this.type = coupon.getType();
        this.status = coupon.getStatus();
        this.goodsType =coupon.getGoodsType();
        this.goodsValue = coupon.getGoodsValue();
        this.timeType = coupon.getTimeType();
        this.days = coupon.getDays();
        this.addTime = DateUtils.dateFormat(coupon.getAddTime());
        this.updateTime = DateUtils.dateFormat(coupon.getUpdateTime());



    }
}
